const isProd = ['prod', 'production'].includes(process.env.NODE_ENV);
const prodPlugins = [];
if (isProd) {
  prodPlugins.push('transform-remove-console');
}
module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
  plugins: [
    [
      'import',
      {
        libraryName: 'vant',
        libraryDirectory: 'es',
        // style: true,
        style: (name) => `${name}/style/less`
      },
      'vant'
    ],
    ...prodPlugins
  ]
};
